package com.GUI.Lesson05;

import javax.swing.*;
import java.awt.*;

public class JScrollDemo extends JFrame {
    public JScrollDemo(){
        Container container = this.getContentPane();

        //文本域
        TextArea textArea = new TextArea(20, 20);
        textArea.setText("123456");

        container.add(textArea);

        this.setVisible(true);
        container.setBackground(Color.green);//没起作用
        this.setBounds(20,20,100,200);
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);


    }

    public static void main(String[] args) {
        new JScrollDemo();
    }
}
